<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>招聘管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        .navbar {
            box-shadow: 0 2px 4px rgba(0,0,0,.1);
        }
        .navbar-brand {
            font-weight: bold;
        }
        .nav-link {
            position: relative;
        }
        .nav-link.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #fff;
        }
    </style>
</head>
<body>
    <nav th:fragment="header" class="navbar navbar-expand-lg navbar-dark bg-primary">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="bi bi-building"></i> 招聘管理系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" th:classappend="${#httpServletRequest.requestURI == '/'} ? 'active'" href="/">
                            <i class="bi bi-house"></i> 首页
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:classappend="${#httpServletRequest.requestURI.startsWith('/job')} ? 'active'" href="/job/list">
                            <i class="bi bi-briefcase"></i> 职位管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:classappend="${#httpServletRequest.requestURI.startsWith('/resume')} ? 'active'" href="/resume/list">
                            <i class="bi bi-file-earmark-text"></i> 简历管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" th:classappend="${#httpServletRequest.requestURI.startsWith('/interview')} ? 'active'" href="/interview/list">
                            <i class="bi bi-calendar-check"></i> 面试管理
                        </a>
                    </li>
                </ul>
                <div class="d-flex">
                    <span class="navbar-text me-3" th:if="${session.user != null}">
                        <i class="bi bi-person-circle"></i> <span th:text="${session.user.username}"></span>
                    </span>
                    <a th:if="${session.user != null}" href="/logout" class="btn btn-outline-light btn-sm">
                        <i class="bi bi-box-arrow-right"></i> 退出
                    </a>
                    <a th:if="${session.user == null}" href="/login" class="btn btn-outline-light btn-sm">
                        <i class="bi bi-box-arrow-in-right"></i> 登录
                    </a>
                </div>
            </div>
        </div>
    </nav>
</body>
</html> 